package main.scala.test

object test01 {
  def main(args: Array[String]): Unit = {
    val colors1 = Map(
      "red" -> "#FF0000",
      "azure" -> "#F0FFFF",
      "peru" -> "#CD853F")
    val colors2 = Map(
      "blue" -> "#0033FF",
      "yellow" -> "#FFFF00",
      "red" -> "#FF0099")

    //  ++ 作为运算符
    var colors = colors1 ++ colors2
    println( "colors1 ++ colors2 : " + colors )

    //  ++ 作为方法
    colors = colors1.++(colors2)
    println( "colors1.++(colors2)) : " + colors )

    colors = colors2 ++ colors1
    println( "colors2 ++ colors1 : " + colors )

  }
}
